package com.ebao.po.qa;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @desc 话题
 * @author snow
 * @date 2012-7-6
 */
@Entity
@Table(name = "T_Topic")
public class TTopic implements Serializable {

	private static final long serialVersionUID = 3692113407774617804L;
	
	private Long id;
	private String topic;		// 话题
	private String[] logo;		// 话题Logo URL,可能有多张不同像素的
	private String description;	// 描述
	private String createDate;	// 创建日期
	private List<TQuestion> questions = new ArrayList<TQuestion>();		// 该话题下的问题

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTopic() {
		return topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

	public String[] getLogo() {
		return logo;
	}

	public void setLogo(String[] logo) {
		this.logo = logo;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(length = 19)
	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	@OneToMany(mappedBy = "topic", targetEntity = TQuestion.class)
	public List<TQuestion> getQuestions() {
		return questions;
	}

	public void setQuestions(List<TQuestion> questions) {
		this.questions = questions;
	}

}
